'use client' import { FC, PropsWithChildren, useRef, useState } from "react"; import './page.scss' import { useRouter } from "@/i18n" import { useTranslations } from "next-intl"; interface Props { } const App: FC> = (props) => { const t = useTranslations("SummaryPage"); const router:any = useRouter() const goPage = (path = '')=>{ if(path){ if(path === 'home'){ router.replace('/') return } // console.log(router); router.replace(`/affiliate/${path}`) return } router.back() } const sliderRef = useRef(null) const [num,setNum] = useState(100) const [money,setMoney] = useState('5000') const handleSlide:any =(e:React.MouseEvent)=>{ if(sliderRef.current){ const startX = sliderRef.current.getBoundingClientRect().x const x = e.clientX - startX const xRem = x/(144*0.6) const intNum = Math.round(10000*xRem)-Math.round(10000*xRem%10) setNum(intNum) const m = intNum*50 let r = '' const arr = m.toString().split('') arr.forEach((item,i)=>{ if(i!==(arr.length-1)&&(arr.length-i-1)%3===0){ r += item + ',' }else{ r += item } }) setMoney(r) const scale = ((Math.round((xRem * 10000)))/100.00).toFixed(2) + '%'; sliderRef.current.style.width = scale } } return (
goPage()}>
{t("Afiliado")} - {t("title")}
goPage('home')}>
goPage('summary')}> {t("PAINEL")}
goPage('referrals')}> {t("REFERÊNCIAS")}
goPage('report')}> {t("RELATÓRIO")}
goPage('payments')}> {t("PAGAMENTOS")}
goPage('faq')}> {t("FAQ")}
{t("TUTORIAL")}
{t("Hoje")}
  • 0 {t("Inscrições")}
  • 0 {t("Novos")}
  • 0 {t("Aposta")}
  • 0 {t("Comissão")}
{t("Total")}
  • 0 {t("Inscrições")}
  • 0 {t("Jogadores")}
  • 0 {t("ApostaTotal")}
  • 0 {t("Comissão")}
{t("Comissão")}
1
{t("Nível")}
  • {t("R$")} 0.00 {t("TotalPago")}
  • {t("R$")} 0.00 {t("Não")}
{t("TRANSFERIR")}
{t("Valor")}
{t("title1")}
  • {t("Facebook")}
  • {t("WhatsApp")}
  • {t("Telegram")}
  • {t("Twitter")}
  • {t("Email")}
{t("content1")}
{t("https")} {t("Cópia")}
{t("title2")}
{t("content2-1")}
{t("content2-2")} {t("business")}
{t("title3")}
{t("content3")}
{t("number")}{num}
{t("Comissão")} > {t("R$")} {money} {t("money")}
{t("title4")}
  • {t("content4-1")} {t("red")} .
  • {t("content4-2")}
); }; export default App;